<template>
    <div class="UserMsg" style="height: 200%">
      <div class="userMsg" v-for="user of users" :key="user.id">
        <div class="demo-type" style="margin: 20px">
          <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" :size="70"></el-avatar>
        </div>
        <el-descriptions class="margin-top" title="用户详细信息" :column="2" :size="size" border>
          <el-descriptions-item>
            <template slot="label" span="4">
              <i class="el-icon-user"></i>
              用户名
            </template>
            {{ user.name }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              <i class="el-icon-s-custom"></i>
              性别
            </template>
            <div v-if="user.sex === 0">女</div>
                  <div v-else="">男</div>
          </el-descriptions-item>

          <el-descriptions-item>
            <template slot="label">
              <i class="el-icon-time"></i>
              年龄
            </template>
            {{ user.age }}
          </el-descriptions-item>

          <el-descriptions-item>
            <template slot="label">
              <i class="el-icon-location-outline"></i>
              出生日期
            </template>
            {{ user.birth }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              <i class="el-icon-mobile-phone"></i>
              手机号
            </template>
            10086
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              <i class="el-icon-tickets"></i>备注</template>
            会唱跳rap篮球
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label">
              <i class="el-icon-office-building"></i>联系地址
            </template>{{ user.addr }}</el-descriptions-item>
        </el-descriptions>
      </div>
    </div>
</template>

<script>
export default {
    name: "PageTwo",
    data() {
      return{
        size:'2',
        users:[],
      }
    },
  mounted() {
    this.users = this.$route.query.userList.list
    console.log(this.users)

    }
}
</script>

<style scoped lang="less">

</style>